.color-grid {
    display: grid;
    gap: 8px;
    margin: 0 auto;
    width: 100%;
}

.grid-cell {
    border-radius: 8px;
    cursor: pointer;
    position: absolute;
    will-change: transform;
    transform-origin: center center;
}

.grid-cell.correct-answer {
    z-index: 1;
    box-shadow: 
        0 0 0 4px white,
        0 0 0 8px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(59, 130, 246, 0.3),
        0 0 60px rgba(59, 130, 246, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.transition-colors {
    transition-property: background-color;
}

.duration-2000 {
    transition-duration: 2000ms;
}

/* Mobile leaderboard animations */
.translate-x-full {
    transform: translateX(100%);
}

.translate-x-0 {
    transform: translateX(0);
}

.rotate-180 {
    transform: rotate(180deg);
}

/* Grid layout and transitions */
.grid-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
}

.grid-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-cell {
    position: absolute;
    border-radius: 8px;
    cursor: pointer;
    transform-origin: center;
}

/* Trickle badge gradient animation */
.trickle-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    border: none !important;
    transition: all 0.3s ease;
}

.trickle-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.dark .trickle-badge {
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #c026d3);
}

/* Trickle logo color filter for light mode */
.trickle-logo {
    filter: brightness(0) saturate(100%);
    opacity: 0.8;
}

.dark .trickle-logo {
    filter: none;
    opacity: 1;
}

/* Dark mode highlight adjustments */
.dark .grid-cell.correct-answer {
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 0 0 8px rgba(255, 255, 255, 0.05),
        0 0 20px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(96, 165, 250, 0.4),
        0 0 60px rgba(96, 165, 250, 0.3);
}
